{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "3e322a6c",
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "d973fe4e",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([1., 2., 3., 4., 5.], dtype=float32)"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "tang_array = np.array([1,2,3,4,5],dtype=np.float32)\n",
    "tang_array"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "dc2413b4",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "dtype('float32')"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "tang_array.dtype"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "6b130901",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "20"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "tang_array.nbytes"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "id": "ea2ee711",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([1, 10, 3.5, 'str'], dtype=object)"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "tang_array = np.array([1, 10, 3.5, 'str'], dtype =object)\n",
    "tang_array"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "id": "2661b02e",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([1., 2., 3., 4., 5.], dtype=float32)"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "tang_array =np.array([1,2,3,4,5])\n",
    "np.asarray(tang_array,dtype = np.float32)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "id": "2c1b0893",
   "metadata": {},
   "outputs": [],
   "source": [
    "tang_array2 = np.asarray(tang_array,dtype = np.float32)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "id": "7f923e8e",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([1, 2, 3, 4, 5])"
      ]
     },
     "execution_count": 19,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "tang_array"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "id": "1e9c6c6c",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([1., 2., 3., 4., 5.], dtype=float32)"
      ]
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "tang_array.astype(np.float32)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "50d3bd8f",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.11.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
